1. Field of the Invention
The present invention relates to management of data recorded in recording media. More specifically, the present invention relates to a data management apparatus for recording and reproducing time-wise continuous data and its data management method.
2. Description of the Prior Art
Data should be recorded and reproduced seamlessly at a high speed in systems like a video server system and nonlinear editing system where time-wise continuous analog signals like images, voices and sounds are digitized and where stream-oriented data is recorded to and reproduced from a recording medium like a hard disk. To meet these requirements, various data management apparatuses have been proposed.
Shown in FIG. 29 is a block diagram of a data management apparatus disclosed in the Japanese patent application laid open under No.10-275058. A computer 8 that makes up this data management apparatus includes a CPU 9, an I/O adapter 10, a memory 5, a PCI bus 1 as host bus, SCSI adapters 2(k) as host adapters connected to the PCI bus 1 (in the present specification, k represents a natural number of one to four), hard disks 4(k) as recording medium connected to SCSI buses 3(k) of those SCSI adapters 2(k), and a control unit 11 that controls access to the hard disks 4(k).
Four SCSI adapters 2(1) to 2(4) paired with four hard disk 4(1) to 4(4) respectively form a group of four recording units. That is, of the four adapters and four hard disks, each pair having the same number in the parentheses form one unit.
Each SCSI adapter 2(k) permits bus master DMA transfer. In other words, a controller 6 built in the SCSI adapter 2(k) acquires occupancy right of the PCI bus 1, and can transfer any data on the memory 5 to a buffer 7 built in the SCSI adapter 2(k).
In the above arrangement, the host bus used is a PCI bus. Any other kind of data transfer bus may be used instead as long as the transfer speed requirements are met. SCSI adapters are used as host adapters. As their alternative, host adapters of any other kind may do as long as they permit bus master DMA transfer.
The I/O adapter 10 can input in the memory 5 a high bit rate stream data in fixed size blocks, and transfer the same to a specific area in the memory 5 or output dataxe2x80x94that is already recorded in a specific area in the memory 5xe2x80x94as a stream data according to instructions from the control unit 11.
The control unit 11 comprises a recording control means 111, a file management means 112 and reproduction control means 113 that are each constituted of software working under CPU. In another arrangement, the data required for control, especially file management information managed by the recording control means 111, is stored in recording means, a hard disk, for example, other than the above-mentioned hard disk 4(k).
In other words, the recording control means 111 under the control of CPU 9 allocates and records among the respective hard disks 4 a stream data continuously inputted in the memory 5 in fixed size blocks so that the data are recorded in time without fail (that is, no overflow in memory 5 is ensured). The file management means 112 arranges and manages the data recorded on the respective hard disks 4. The reproduction control means 113 controls the data so that the data allocated in the respective hard disks 4 is read out and rebuilt one after another into a stream data and outputted to the I/O adapter 10.
Detailed procedure of recording data by the recording control means 111 is explained.
Inputting means (not shown) included in the recording control means 111 divides a stream data inputted from I/O adapter 10 in blocks {circumflex over (1)}, {circumflex over (2)}, {circumflex over (3)} . . . of a fixed size and allocates the above data divided in blocks {circumflex over (1)}, {circumflex over (2)}, {circumflex over (3)} . . . of a fixed size to the respective hard disks 4(k) by relating the data thereto so that a plurality of hard disks 4(k) forming the above described recording unit group makes one logical recording space.
At the same time, writing means (not shown) included in the recording control means 111 directs the respective SCSI adapters 2(k) to transfer the above allocated blocks {circumflex over (1)}, {circumflex over (2)}, {circumflex over (3)} . . . of a fixed size to the respective hard disks 4(k). So directed, controllers 6 (k) built in the SCSI adapters 2(k) store the above blocks {circumflex over (1)}, {circumflex over (2)}, {circumflex over (3)} . . . of a fixed size in the buffers 7(k) and record data on the hard disks 4(k) respectively.
To illustrate, as shown in FIG. 30, the controller 6(1) records the fixed-size block {circumflex over (1)} on the hard disk 4(1). The controller 6(2) records the block {circumflex over (2)} of a fixed size on the hard disk 4(2). And the controller 6(3) records the block {circumflex over (3)} of a fixed size on the hard disk 4(3). This way, the above blocks {circumflex over (1)}, {circumflex over (2)}, {circumflex over (3)} . . . of a fixed size are recorded in sequential order.
The above process alternates between the step of transferring data to a buffer 7(k) forming a recording unit from the stream data source and the step of recording the data from the buffer 7(k) to a hard disk 4(k). In a plurality of recording units, the above-described steps are apparently performed simultaneously, permitting high-speed and seamless recording of data.
The file management means 112 manages a variety of pieces of information about the stream data recorded on the hard disk 4(k) above as file management information. (Details of the file management information will be explained later.)
In case files are managed by a computer etc. in a usual manner, the file system, for example, a file allocation table (FAT), provided in the operating system used in the computer is employed. Therefore, such functions as a function of recovering broken data on the hard disk (xe2x80x9crecovering functionxe2x80x9d), and a function of detecting defective regions on the hard disk (xe2x80x9cdefective region detecting functionxe2x80x9d) are performed by using the above-mentioned file system.
Naturally, however, it is necessary to independently design the recovering function or the defective regions detecting function in a management apparatus provided with an independent file system as described above and not with the file system adopted in the operating system.
In the file systems such as FAT, data to be recorded and file management information are stored on the same recording medium but in different regions. As a result the head has to seek frequently on the hard disk. However, since recording and reproduction of a stream data like video data has to be carried out seamlessly at a high speed the seeking of the head on the hard disk has to be minimized.
In consideration of that, it is necessary to develop a file system that records file management information on a recording medium independent from the data to be recorded. Furthermore, the file system must posses functions of recovering data and detecting defective regions.
In other words, when file management information stored in the aforesaid other recording medium is damaged due to some circumstances, the information can not be recorded or reproduced even though the stream data itself exists on the hard disk 4. In such a case, the file management information stored on the above-mentioned data recording medium has to be repaired. In addition, in case on-going data recording is interrupted because of some trouble, a variety of pieces of information on the stream data recorded up to the point of the interruption is not normally registered as file management information on the above-mentioned other recording medium. Then, to avoid the stream data becoming invalid, it is necessary to generate file management information on the above-mentioned other recording medium.
Furthermore, in case a defective sector exists during data recording, the head on the hard disk 4 attempts to write several times (number of trials varies depending on the system). When writing fails after several trials, recording is done on a substitute sector. The substitute sector is located away from the original sector, and the head has to seek. The seeking to the substitute sector increases as the number of defective sectors rises, which greatly affects the access efficiency of the hard disk 4 and becomes the cause of errors (overflow errors and underflow errors) in recording and reproducing a stream data. This problem is the time needed for recording and reproducing is prolonged while the recording and reproduction instructions to the hard disk 4 themselves do not become errors. It is a difficult problem to deal with.
In view of the prior art described above, including the disadvantages and deficiencies of the prior art, it is an object of the present invention to provide a data management apparatus for high-speed and seam-less recording and reproduction of data, which is provided with a function of recovering data and a function of detecting defective regions; its data management method; and furthermore, a recording medium where the procedure to materialize the method is recorded.
To achieve the foregoing object, the following means are adopted. That is, the present invention is built on a data management apparatus provided, as shown in FIG. 1, with a recording control means 111 which divides a stream data into blocks of a fixed size and records these fixed-size data blocks on first recording media 4 and a file management means 112 which manages the data streamxe2x80x94recorded on the first recording mediaxe2x80x94according to file management information to specify the stream data.
Here, after generating retrieval information on the fixed size blocks, the recording control means 111 adds and records the retrieval information to the fixed size blocks, while a recovering means 114 recovers file management information on the basis of the above-mentioned retrieval information when instructed to do so.
If the above-mentioned retrieval information is recorded on the remaining area of the last sector of a block, there is no need to provide a special sector, and recovery is possible to make with a small volume. The recording of the above-mentioned retrieval information does not always have to be effected on the remaining area but may be made on the sector next to the last sector of the block, though.
Furthermore, the recording control means 111 splits file management information into units of a specific size, generating a plurality of pieces of split management information. And the recording control means 11 adds and records the split management information on the above-mentioned blocks of a fixed size. The recovering means 114 recovers file management information on the basis of the above-mentioned split management information when instructed to do so.
In the above-mentioned procedure, it is desirable to record file management information on a recording medium other than the first recording medium in order to maintain the high speed of recording and reproduction. This second recording medium may be a hard disk, flash memory and so forth. Here, it is so arranged that the file management information recorded on the second recording medium is split into units of a fixed size to generate a plurality of pieces of split management information. Then, the split management information is added to the fixed size blocks and recorded on the first recording medium.
Furthermore, the recording control means 111 generates access history information about accessing of fixed-size blocks, for example, writing time history. After that, the recording control means 111 adds and records the access history information to the fixed size blocks. Defective region detection means 115 shown in FIG. 2 detects a defective region on the recording medium 4xe2x80x94a region where the access history information exceeds a specific value. The reproduction control means 113 generates history information about the reproduction time of fixed size blocks and then adds and records history information about the reproduction time (reading time) to the above-mentioned fixed size blocks. And a region where the history information on the reproduction time exceeds a specific value is detected.
The number of detective sectors within the fixed size blocks may be used as an alternative to the above-mentioned writing time history, reading time history. It may also be so arranged that instead of judging fixed size blocks as flawless or defective on a specific threshold level as set forth above, a plurality of levels generated according to the value of the access history in the above-mentioned defective sector detection procedure are prepared in advance. And a choice is made from among those levels according to an application used.